home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / applications / 2387 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: imaginet.fr!usenet
  2. From: yeproy@imaginet.fr (Yann-Erick Proy)
  3. Newsgroups: comp.sys.amiga.applications
  4. Subject: Re: $user and MultiUser
  5. Date: 16 Feb 1996 23:11:33 GMT
  6. Organization: ImagiNET
  7. Message-ID: <801.6620T1376T51@imaginet.fr>
  8. References: <w1gg2cbadyg.fsf@nyi.ifi.uio.no>
  9. NNTP-Posting-Host: national10.imaginet.fr
  10. X-Newsreader: THOR 2.22 (Amiga;TCP/IP) *UNREGISTERED*
  11.  
  12. Uwe Sigurd Valentin Kubosch wrote:
  13.  
  14. > Does logout/login not set the 'user' variable?  Is there another
  15. > way of detecting which user is calling a command or script?  Is
  16. > there a way to set this in .login/.profile?
  17.  
  18. To get the user ID in a script you only need to put <UserInfo QUICK> between
  19. quotes. For example, my global .profile script does this:
  20.  
  21. ...
  22. SetEnv USER `UserInfo QUICK`
  23. ...
  24.  
  25. You are warned that only testing such a ENV:USER variable once it has been
  26. set this way is erroneous, since every subsequent login issued while there
  27. is at least somebody on the login stack does *NOT* induce the execution of
  28. .profile scripts.
  29.  
  30.  
  31. Regards,
  32.  
  33. Yann
  34.  
  35. --
  36. Yann-Erick Proy               yeproy@imaginet.fr - Yann-Erick.Proy@Imag.fr
  37. A2000/PPS040/Picasso/USR28k   Quantum730/Maxtor330/Toshiba4x/Cipher150
  38.  
  39.  
  40.